<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLocalTicketPushTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('local_ticket_push', function (Blueprint $table) {
            $table->increments('id');
            $table->string('cinema_code',10);
            $table->string('local_name',50);
            $table->integer('ticket_id');
            $table->string('ticket_code',20);
            $table->unique(['cinema_code','local_name']);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('local_ticket_push');
    }
}
